<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
         
         /* 方案一 */
        #box{
            box-sizing: border-box;
            padding-top:100px;
            width: 100px;
            height: 100%;
            position: relative;
            border: 1px black solid;
        }
        .box{
            position:absolute;
            top: 0;
            height: 100px;
            width: 100%;
            border: 1px black double;
        }
        .box2{
            height: 100%;
            width: 100%;
        }

        /* 方案二 */
        /* #box{
            box-sizing: border-box;
            width: 100px;
            height: 100%;
            position: relative;
            border: 1px black solid;
        }
        .box{
            height: 100px;
            width: 100%;
        }
        .box2{
            position: absolute;
            left: 0;
            top: 100px;
            height:auto;
            width: 100%;
            border: 1px dashed orange;
        } */

        /* 方案三 */
        /* #box{
            width: 100px;
            height: 100%;
            border: 1px dashed black;
            padding-top: 100px;
        }
        .box{
            width: auto;
            height: 100px;
            margin-top: -100px;
            border: 1px solid black;
        }
        .box2{
            width: auto;
            height: auto;
        } */
    </style>
</head>
<body>
    <!-- 有一个高度自适应的div,里面有两个div,一个高度100px，另一个填满 -->
    <div id="box">
        <div class="box">盒子1</div>
        <div class="box2">盒子2</div>
    </div>
</body>
</html>